package net.pimpas.report.processor.serviceprovider;

import java.util.List;

import net.pimpas.core.serviceprovider.ServiceProvider;
import net.pimpas.report.processor.condition.Condition;
import net.pimpas.report.processor.exception.ConditionException;
import net.pimpas.report.processor.exception.FieldValidationException;
import net.pimpas.report.processor.exception.ProjectionException;
import net.pimpas.report.processor.exception.TreeGeneratorException;
import net.pimpas.report.processor.field.Field;
import net.pimpas.report.processor.projection.Projection;
import net.pimpas.report.processor.tree.Tree;

import org.hibernate.criterion.DetachedCriteria;

public interface ReportProcessorServiceProvider extends ServiceProvider {

	Tree createTree( Class<?> rootClass, String treeName ) throws TreeGeneratorException;
	DetachedCriteria apply(Tree tree, List<Condition> conditions, List<Projection> projections)
		throws ConditionException, ProjectionException, FieldValidationException;
	Field createField( String name );
	
	void validate(Tree tree, List<Condition> conditions, List<Projection> projections)
		throws FieldValidationException;
	
}